package com.meituan.sdk.model.ddzh.thirdresource.updateDeviceStatus;

import com.meituan.sdk.annotations.ApiMeta;
import java.util.List;
import com.google.gson.reflect.TypeToken;
import java.lang.reflect.Type;
import com.meituan.sdk.internal.utils.JsonUtil;
import com.google.gson.annotations.SerializedName;
import javax.validation.constraints.NotNull;
import com.meituan.sdk.MeituanResponse;
import com.meituan.sdk.MeituanRequest;
import javax.validation.constraints.NotEmpty;

/**
* 更新单个门店下指定设备状态
* This file was automatically generated.
*/
@ApiMeta(
    path = "/ddzh/thirdresource/updatedevicestatus",
    businessId = 58,
    apiVersion = "10021",
    apiName = "update_device_status",
    needAuth = true
)
public class UpdateDeviceStatusRequest implements MeituanRequest<UpdateDeviceStatusResponse> {
    /**
    * <p data-diff-id="ct-diff-id-5c0bae9a-8ad0-49bf-9f93-4d35d12d5a00"><span style="color: rgb(51, 51, 51)">13位毫秒级时间戳，为具体操作时间</span></p>
    */
    @NotNull(message = "timestamp不能为空")
    @SerializedName("timestamp")
    private Long timestamp;
    /**
    * <p data-diff-id="ct-diff-id-22620721-5ef7-4455-80ef-30245e0b5eb9"><span style="color: rgba(0, 0, 0, 0.65)">三方设备状态信息列表</span></p>
    */
    @NotEmpty(message = "statusInfos不能为空")
    @SerializedName("statusInfos")
    private List<DeviceStatusInfo> statusInfos;

    public Long getTimestamp() {
        return timestamp;
    }
    public void setTimestamp(Long timestamp) {
        this.timestamp = timestamp;
    }
    public List<DeviceStatusInfo> getStatusInfos() {
        return statusInfos;
    }
    public void setStatusInfos(List<DeviceStatusInfo> statusInfos) {
        this.statusInfos = statusInfos;
    }


    @Override
    public MeituanResponse<UpdateDeviceStatusResponse> deserializeResponse(String response) {
        Type type = new TypeToken<MeituanResponse<UpdateDeviceStatusResponse>>(){}.getType();
        return JsonUtil.fromJson(response, type);
    }
    @Override
    public String serializeToJson() {
        return JsonUtil.toJson(this);
    }


    @Override
    public String toString() {
        return "UpdateDeviceStatusRequest{" + "timestamp=" + timestamp + "," + "statusInfos=" + statusInfos + "}";
    }
}
